home *** CD-ROM | disk | FTP | other *** search
/ Software Vault: The Gold Collection / Software Vault - The Gold Collection (American Databankers) (1993).ISO / cdr01 / halcn305.zip / GSDMO_08.PAS < prev    next >
Pascal/Delphi Source File  |  1993-05-02  |  2KB  |  73 lines

  1. Program GSDMO_08;
  2. {------------------------------------------------------------------------------
  3.                           DBase File Structure Lister
  4.  
  5.        Copyright (c)  Richard F. Griffin
  6.  
  7.        20 January 1993
  8.  
  9.        102 Molded Stone Pl
  10.        Warner Robins, GA  31088
  11.  
  12.        -------------------------------------------------------------
  13.        This program demonstrates how dBase file structures may be listed
  14.        using Griffin Solutions units.
  15.  
  16.        The program opens a dBase file and lists all fields from each
  17.        record along with its structure.
  18.  
  19.        New procedures/functions introduced are:
  20.  
  21.                  Deleted
  22.                  Field
  23.                  FieldCount
  24.                  FieldDec
  25.                  FieldGetN
  26.                  FieldLen
  27.                  FieldType
  28.                  LUpdate
  29.                  RecCount
  30.                  RecNo
  31.  
  32. -------------------------------------------------------------------------------}
  33.  
  34. uses
  35.    GSOBShel,
  36.    {$IFDEF WINDOWS}
  37.       WinCRT,
  38.       WinDOS;
  39.    {$ELSE}
  40.       CRT,
  41.       DOS;
  42.    {$ENDIF}
  43.  
  44. var
  45.    MFields : integer;
  46.    Ch      : char;
  47. begin
  48.    Ch := ' ';
  49.    SetCenturyOn;
  50.    Select(1);
  51.    Use('GSDMO_07');
  52.    GoTop;
  53.    while (not dEOF) and (Ch <> #27) do     {loop until EOF or ESC pressed}
  54.    begin
  55.       ClrScr;
  56.       Writeln('Record Number ',RecNo ,' of ',RecCount);
  57.       Writeln;
  58.       for MFields := 1 to FieldCount do
  59.          writeln(MFields:3,'  [',
  60.                  FieldType(MFields),'] [',
  61.                  FieldLen(MFields):2,',',
  62.                  FieldDec(MFields):1,']  ',
  63.                  Field(MFields):10,': ',
  64.                  FieldGetN(MFields));
  65.       writeln;
  66.       writeln('Deleted Status = ',Deleted);
  67.       writeln('Last Update: ',LUpdate);
  68.       Ch := ReadKey;                    {wait for keypress}
  69.       Skip(1);
  70.    end;
  71.    CloseDataBases;
  72. end.
  73.